home *** CD-ROM | disk | FTP | other *** search
- LIST
-
- Lists specified information about directories and files.
-
- Format
-
- LIST [{<dir | pattern | filename>}] [P | PAT <pattern>] [KEYS] [DATES]
- [NODATES] [TO <name>] [DUB <string>] [SINCE <date>] [UPTO <date>] [QUICK]
- [BLOCK] [NOHEAD] [FILES] [DIRS] [LFORMAT <string>] [ALL]
-
- Template
-
- DIR/M,P=PAT/K,KEYS/S,DATES/S,NODATES/S,TO/K,SUB/K,SINCE/K,UPTO/K,QUICK/S,BLOC
- K/S,NOHEAD/S,FILES/S,DIRS/S,LFORMAT/K,ALL/S
-
- Location
-
- C:
-
- LIST displays information about the contents of the current directory. If you
- specify a <dir>, <pattern>, or <filename> argument, LIST displays information
- about the specified directory, all directories or files that match the
- pattern, or the specified file, respectively. The PAT argument lets you
- specify an additional pattern to match.
-
- Unless other options are specified, LIST displays the following:
-
- name
-
- The name of the file or directory.
-
- size
-
- The size of the file in bytes. If there is nothing in this file, the field
- reads "empty". For directories, this entry reads "Dir".
-
- protection
-
- The protection bits that are set for this file are shown as letters. The
- clear (unset) bits are shown as hyphens. Most files show the default
- protection bits, ----rwed for readable/writable/executable/deletable. See the
- PROTECT command for more on protection bits.
-
- date and time
-
- The date and time the file was created or last changed.
-
- comment
-
- The comment, if any, placed on the file using the FILENOTE command. It is
- preceded by a colon (:).
-
- LIST uses the following options to change the way the output is displayed:
-
- KEYS
-
- Displays the block number of each file header or directory.
-
- DATES
-
- Displays dates. (For example, DD-MMM-YY is the USA default).
-
- NODATES
-
- Does not display date and time information.
-
- TO <name>
-
- Specifies an output file or device for LIST; by default, LIST outputs to the
- current window.
-
- SUB <string>
-
- Lists only files containing the substring <string>.
-
- SINCE <date>
-
- Lists only files timestamped on or after the specified date.
-
- UPTO <date>
-
- Lists only files timestamped on or before the specified date.
-
- QUICK
-
- Lists only the names of files and directories.
-
- BLOCK
-
- Displays file sizes in 512-byte blocks, rather than bytes.
-
- NOHEAD
-
- Suppresses printing of the header and summary information.
-
- FILES
-
- Lists files only (no directories).
-
- DIRS
-
- Lists directories only (no files).
-
- LFORMAT
-
- Defines a string to specially format LIST output.
-
- ALL
-
- Lists the contents of all directories and subdirectories.
-
- The LFORMAT option modifies the output of LIST and can be used as a quick
- method of generating script files. When using LFORMAT, specify an output
- format string; this string is output for each file or directory normally
- listed. It can contain any text you specify, plus the usual LIST output
- information. When LFORMAT is specified, the QUICK and NOHEAD options are
- automatically selected. To save the output, you must redirect it to a file by
- using the > operator or specifying a TO file. (For examples using the LIST
- LFORMAT option, see Chapter 8.)
-
- The available substitution operators are:
-
- %A
-
- Prints file attributes (protection bits).
-
- %B
-
- Prints size of file in blocks.
-
- %C
-
- Prints any comments attached to the file.
-
- %D
-
- Prints the date associated with the file.
-
- %E
-
- Prints just the file extension.
-
- %K
-
- Prints the file key block number.
-
- %L
-
- Prints the length of the file in bytes.
-
- %M
-
- Prints the file name only, omitting any extension.
-
- %N
-
- Prints the name of the file.
-
- %P
-
- Prints the file parent path.
-
- %S
-
- Superseded by %N and %P; still functional.
-
- %T
-
- Prints the time associated with the file.
-
- You can put a length specifier and/or a justification specifier between the
- percent sign (%) and the field specifier. To specify left justification,
- place a minus sign (-) before the length specifier. Otherwise, the
- information displayed is right justified.
-
- The default output of the LIST command uses the following specification:
-
- %-24 %7L %A %D %T
-
- Example 1:
-
- > LIST Dirs
-
- Prefs Dir ----rwed 27-Jun-93 11:43:59
- T Dir ----rwed 16-Jul-93 11:37:43
- Trashcan Dir ----rwed 21-Jun-93 17:54:20
-
- Only the directories in the current directory, in this case SYS:, are listed.
- (A shortened version of the typical output is shown above.)
-
- Example 2:
-
- 1> LIST LI#? TO RAM:Libs.file
-
- LIST searches for any directories or files that start with LI. The output of
- LIST is sent to Libs.file in RAM:.
-
- Example 3:
-
- 1> LIST DF0:Documents UPTO 09-Oct-90
-
- Only the files or directories in the Documents directory of DF0: that have
- not been changed since October 9, 1990 are listed.
-
- For further examples using the LIST command, see Chapter 8.
-